#include "WorldProcess.h"
#include "ScriptMgr.h"
#include "NGLog.h"
#include "Opcodes.h"
#include "WorldProcess.h"
#include "GameUserCommand.h"
#include "ScriptWorldProcess.h"
#include "ChannelManager.h"
#include "OpcodesEx.h"
#include "GatewayOpcodes.h"

#include "twmjn/TWMJOpcode.h"
#include "TWMJOpcode.h"
#include "twmjn/TWMJAIInterface.h"
#include "twmjn/TWMJGameStruct.h"
#include "twmjn/TWMJXmlDataManager.h"
#include "twmjn/TWMJScriptWorldProcess.h"
//-----------------------------------------------------------------------
void  register_custom_world_process(ScriptMgr * mgr)
{
	//// 请求玩家信息
	//mgr->register_server_process(CMSG_ENTERROOM, script_twmj_chr);
	//Log.Debug("TWMJ World Process", "Register opcode 0x%02x Process:[%s]", CMSG_ENTERROOM, "script_twmj_chr");


	// 玩家加入牌桌
	mgr->register_server_process(CMSG_ENTERROOM, script_twmj_join);
	Log.Debug("TWMJ World Process", "Register opcode 0x%02x Process:[%s]", CMSG_ENTERROOM, "script_twmj_join");

	// 请求玩家信息
	mgr->register_server_process(CMSS_TWMJ_chr, script_twmj_chr);
	Log.Debug("TWMJ World Process", "Register opcode 0x%02x Process:[%s]", CMSS_TWMJ_chr, "script_twmj_chr");

	// 请求目标玩家信息
	mgr->register_server_process(CMSS_TWMJ_targetchr, script_twmj_targetchr);
	Log.Debug("TWMJ World Process", "Register opcode 0x%02x Process:[%s]", CMSS_TWMJ_targetchr, "script_twmj_targetchr");

	// 玩家准备
	mgr->register_server_process(CMSS_TWMJ_Ready, script_twmj_Ready);
	Log.Debug("TWMJ World Process", "Register opcode 0x%02x Process:[%s]", CMSS_TWMJ_Ready, "script_twmj_Ready");

	// 玩家离开牌桌 公共协议 CMSG_EXITTOHALL 0x0018
	mgr->register_server_process(CMSG_EXITTOHALL, script_twmj_leave);
	Log.Debug("TWMJ World Process", "Register opcode 0x%02x Process:[%s]", CMSG_EXITTOHALL, "script_twmj_leave");



}


